package cn.yunyichina.provider.pay.utils;

/**
 * 获取his对账信息类型转化工具
 *
 * @author Administrator
 */
public class FinanceConverUtil {

    public static short ConverOrderType(String str) {

        short conShort = (short) 0;
        switch (str) {
            case "2":
                conShort = Short.valueOf("3");
                break;
            case "3":
                conShort = Short.valueOf("4");
                break;
            case "4":
                conShort = Short.valueOf("1");
                break;
            case "5":
                conShort = Short.valueOf("2");
                break;
            default:
                conShort = Short.valueOf("0");
        }

        return conShort;
    }

    public static short ConverPayMode(String str) {

        short conShort = (short) 1;
        switch (str) {
            case "1":
                conShort = Short.valueOf("1");
                break;
            case "2":
                conShort = Short.valueOf("2");
                break;
            case "5":
                conShort = Short.valueOf("2");
                break;
            case "99":
                conShort = Short.valueOf("2");
                break;
            case "9":
                conShort = Short.valueOf("2");
                break;
            case "98":
                conShort = Short.valueOf("1");
                break;
        }

        return conShort;
    }
}
